/**
 * @author gklinkmann
 * Check, that the user is logged in 
 */
class SecurityFilters {
	def filters = {
		loginCheck(controller:'*', action:'*', uriExclude:"/") {
           before = {
        	  def allowedActions=["index","show","list","login","doLogin"]

              if(!session.user && !allowedActions.contains(actionName)) {
            	  redirect(controller:'user',action:'login')
                  return false
               }
           }
		}
	}
}